<template>
  <div class="iframe-content">
    <iframe :src="yuanchunUrl" width="100%" height="100%" id="jiwufu"></iframe>
  </div>
</template>
<script>
  import {
    getNewyearLoginH5
  } from '@/api/yuanchun'
  export default {
    data() {
      return {
        yuanchunUrl: ''
      }
    },
    mounted() {
      let localData = JSON.parse(localStorage.getItem('logininfo'));
      console.log(localData)
      getNewyearLoginH5({
        "userId": localData.userId,
        "userName": localData.userName,
        "depCode": localData.orgSeq,
        "depName": localData.orgName,
        "depType": localData.orgType,
      }).then(res => {
        if (res.code == 1) {
          let data = JSON.parse(res.result.replaceAll("\\\\", "\\/"));
          console.log('data', data)
          this.yuanchunUrl =
            `https://jiwufu.wuliangye.com.cn/ydyc-management/#/ydyc-management/activityManagemeent?token=${data.data.token}&userId=${localData.userId}`
        } else {
          this.$message({
            type: 'error',
            message: res.message
          })
        }
        console.log(this.yuanchunUrl)
      })
    },
    methods: {

    }
  };
</script>
<style scoped>
  .iframe-content {}

  iframe {
    width: 85vw;
    height: 85vh;
    overflow: scroll;
    border: none !important;
  }
</style>
